import 'package:flutter/material.dart';
import 'package:test1/View/MyRowText.dart';
import 'package:test1/pages/data/Flutter_Data_Dart_Simple_Page.dart';
import 'package:test1/pages/data/Flutter_Data_File_Page.dart';
import 'package:test1/pages/data/Flutter_Data_Path_Provider_Page.dart';
import 'package:test1/pages/data/Flutter_Data_SharedPreferences_Page.dart';
import 'package:test1/pages/data/Flutter_Data_Sqflite_Page.dart';

class Flutter_Data_Pages extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("数据存储与文件读取"),
        ),
        body: ListView(
          children: <Widget>[
//            MyRowText("顺序执行", () {
//              Navigator.push(
//                  context,
//                  MaterialPageRoute(builder: (BuildContext context) {
//                    return Flutter_Data_Dart_Simple_Page();
//                  })
//              );
//            }),
            MyRowText("path_provider插件读取与写入文件", () {
              Navigator.push(
                  context,
                  MaterialPageRoute(builder: (BuildContext context) {
                    return Flutter_Data_Path_Provider_Page();
                  })
              );
            }),
            MyRowText("SharedPreferences", () {
              Navigator.push(
                  context,
                  MaterialPageRoute(builder: (BuildContext context) {
                    return Flutter_Data_SharedPreferences_Page();
                  })
              );
            }),
//            MyRowText("sqflite", () {
//              Navigator.push(
//                  context,
//                  MaterialPageRoute(builder: (BuildContext context) {
//                    return Flutter_Data_Sqflite_Page();
//                  })
//              );
//            }),
            MyRowText("本地存储与读取", () {
              Navigator.push(
                  context,
                  MaterialPageRoute(builder: (BuildContext context) {
                    return Flutter_Data_File_Page();
                  })
              );
            }),
          ],
        ),
      ),
    );
  }
}